package com.itheima.spring.spring;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;

/**
 * @author ：sean
 * @date ：Created in 2020/6/21
 * @description ：
 * @version: 1.0
 */
@Component
public class HeimaBeanFactoryProcessor implements BeanFactoryPostProcessor {
	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		System.out.println("HeimaBeanFactoryProcessor postProcessBeanFactory");
		// 通过beanFactory后期到bdMap，获取到bd信息类，修改beanClass
		//String beanName = "userServiceImpl";
		//BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanName);
		//if(beanDefinition!=null)
		//	beanDefinition.setBeanClassName("com.itheima.spring.service.TagService");

	}
}
